<template>
  <el-card style="max-width: 480px" @click="doCardClick">
    <el-image :src="movie.movieIcon" />
    <template #header>{{ movie.movieName }}</template>
  </el-card>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";
import { defineProps, withDefaults, ref } from "vue";
import API from "@/api";
import ShareModal from "@/components/ShareModal.vue";

interface Props {
  movie: API.MovieVO;
}

const props = withDefaults(defineProps<Props>(), {
  movie: () => {
    return {};
  },
});

const router = useRouter();
const doCardClick = () => {
  router.push(`/movie/detail/${props.movie.id}`);
};
</script>
<style scoped>
.appCard {
  cursor: pointer;
}

.icon-hover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transition: all 0.1s;
}

.icon-hover:hover {
  background-color: rgb(var(--gray-2));
}
</style>
